import { Map} from 'immutable'

const  defaultvalue =  Map({
  cityname:'',
  sheng:'',
  shi:'',
  qu:''
})

export default (state= defaultvalue,action)=>{
  switch (action.type){
    case 'changeSheng':
      return state.set('sheng',action.value)
    case 'changeShi':
      return state.set('shi',action.value)
    case 'changeQu':
      return state.set('qu',action.value)
      default:
        return  state
  }
}